<template>
  <div class="detailList">
    <div  v-for="(item, index) of list" :key="index">
      <div class="title border-bottom">
          <span class="item-icon"></span>
          {{item.title}}
      </div>
      <div class="item-child" v-if="item.children">
          <List :list="item.children"></List>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'List',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/varibles.styl"
  .detailList
    .title
      height: .8rem
      line-height:.8rem
      font-size: .3rem
      padding-left: .2rem
      .item-icon
        display: inline-block
        position: relative
        width: .36rem
        height: .36rem
        top: .05rem
        left: .1rem
        background: url(http://s.qunarzz.com/piao/image/touch/sight/detail.png) 0 -.45rem no-repeat
        margin-right: .1rem
        background-size: .4rem 3rem
    .item-child
      padding-left: .2rem
</style>
